import numpy as np
import matplotlib.pyplot as plt

# 1、设计一个动态的曲线图
x = np.linspace(0,10,100)
y = np.sin(x)

line, = plt.plot(x,y,'r-')

for i in range(100):
    y = np.sin(x + np.pi * i / 10)
    line.set_data(x,y)
    plt.pause(0.2) # 每隔0.2 s暂停一下
# 2、设置曲线图的显示模式
# File --> Settings --> Tools --> Python Scientific --> 将勾选项取消 --> Apply

